/*
 * SPDX-License-Identifier: Apache-2.0
 */

package org.hyperledger.fabric.samples.assettransfer;

import java.util.Objects;

import org.hyperledger.fabric.contract.annotation.DataType;
import org.hyperledger.fabric.contract.annotation.Property;

import com.owlike.genson.annotation.JsonProperty;

@DataType()
public final class Asset {
    @Property()
    private final String id;

    @Property()
    private final String cId;

    @Property()
    private final String IID;

    @Property()
    private final String oId;

    @Property()
    private final String report;



    public String getId() {
        return id;
    }

    public String getcId() {
        return cId;
    }

    public String getIID() {
        return IID;
    }

    public String getoId() {
        return oId;
    }

    public String getReport() {
        return report;
    }

    public Asset(@JsonProperty("id") final String id,
                 @JsonProperty("cId") final String cId,
                 @JsonProperty("IID") final String IID,
                 @JsonProperty("oId") final String oId,
                 @JsonProperty("report") final String report) {
        this.id = id;
        this.IID = IID;
        this.cId = cId;
        this.oId = oId;
        this.report = report;

    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Asset asset = (Asset) o;
        return Objects.equals(id, asset.id) && Objects.equals(cId, asset.cId) && Objects.equals(IID, asset.IID) && Objects.equals(oId, asset.oId) && Objects.equals(report, asset.report);
    }


}
